<?php

/**
 * Class SysRoleLogic
 */
class SysRoleLogic extends Model
{
    private $_modelSysRole = null;
    private $_customerId = null;

    public function __construct()
    {
        $this->_customerId = Session::$user['customerId'];
        Session::switchCustomer(0);

        $this->_modelSysRole = D('SysRole');

        Session::switchCustomer($this->_customerId);
    }


    /** --------------------------------------  增  -------------------------------------- */

    /** --------------------------------------  删  -------------------------------------- */


    /** --------------------------------------  改  -------------------------------------- */

    /** --------------------------------------  查  -------------------------------------- */

    /**
     * 指定条件查询指定列数据
     *
     * @param       $fields
     * @param array $where
     * @return mixed
     */
    public function selectFieldsWithWhere($fields, array $where)
    {
        return $this->_modelSysRole->where($where)->field($fields)->select();
    }

}